/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package abricots.entity.drawer;

import abricots.entity.BallEntity;
import abricots.entity.state.ControllableEntityState;
import abricots.entity.state.EntityState;
import org.newdawn.slick.Color;
import org.newdawn.slick.Graphics;

/**
 *
 * @author charly
 */
public class BallEntityDrawer implements EntityDrawer {
   private BallEntity entity;

   public BallEntityDrawer(BallEntity entity) {
      this.entity = entity;
   }

   @Override
   public void draw(EntityState state, Graphics g) {
      ControllableEntityState entityState = (ControllableEntityState) state;
      Color color = Color.red;
      g.pushTransform();
      g.translate(entityState.getPosX(), entityState.getPosY());
      g.setColor(color);
      g.fillOval(-5, -5, 10, 10);
      g.popTransform();
   }
}
